from typing import Optional

from pydantic import BaseModel


class MenuBase(BaseModel):
    menu_name: Optional[str]
    menu_route: Optional[str]
    menu_icon: Optional[str]
    menu_order: Optional[int]
    parent_id: Optional[int] = None


class MenuCreate(MenuBase):
    pass


class MenuUpdate(MenuBase):
    id: int


class MenuInDBBase(MenuBase):
    id: int


class Menu(MenuInDBBase):
    pass

